﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class contact_form : System.Web.UI.Page
{
     dulieuDataContext db=new dulieuDataContext();
    protected void Page_Load(object sender, EventArgs e)
    {
        if(!IsPostBack)
        {
            txtmabv.Text = ThuVien.Lib.RandomString(6,false);
        }
    }
     protected void LblsendClick(object sender, EventArgs e)
    {
        var user = new UserContact()
                             {
                                 Name = txthoten.Text,
                                 Mobile = txtmobile.Text,
                                 Email = txtemail.Text,
                                 Content = txtnoidung.Text
                             };
        db.UserContacts.InsertOnSubmit(user);
        db.SubmitChanges();
        lblthongbao.Text = "Gửi thành công";
    }

}